class CreateSkus < ActiveRecord::Migration[5.2]
  def change
    create_table :skus do |t|
      t.string :name
      t.integer :spu_id
      t.decimal :promotion_price, :precision => 10, :scale => 2, :default => 0.0
      t.decimal :cost_price, :precision => 10, :scale => 2, :default => 0.0
      t.decimal :sale_price, :precision => 10, :scale => 2, :default => 0.0
      t.integer :on_hand_count, default: 0

      t.timestamps
    end
  end
end
